package cn.zpro.jeecg.mvc.service;

import java.util.Set;

import org.junit.Test;

import cn.zpro.jeecg.mvc.util.AnnotationUtil;
import cn.zpro.jeecg.mvc.util.Constant;
import cn.zpro.jeecg.mvc.util.PackUtil;

public class MvcService {
	public static void main(String[] args) {
		
		String url =new MvcService().findUrlByAnnotation("DepAction", "list");
		System.out.println(url);
	}

	@Test
	public String findUrlByAnnotation(String actionName,String method) {
		String url  = "";
		Set<Class<?>> classess = PackUtil.getClasses(Constant.PACKAGE);
		for (Class<?> class1 : classess) {
			url = AnnotationUtil.checkAnnotation(class1,actionName,method);
		}
		
		return url;
	}
}
